if (WIN32)
	if(MSVC)
		add_definitions(  -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
	else(MSVC)
        add_definitions(-DBOOST_ALL_NO_LIB)
		add_definitions( -DBOOST_ASIO_DISABLE_IOCP -D__USE_W32_SOCKETS )
	endif(MSVC)
else (WIN32)
endif (WIN32)



if(MSVC)
link_directories( ${DEPENDENCIES_DIR}/lib/Windows)
else(MSVC)
    if(ANDROID_NDK)
        link_directories( ${DEPENDENCIES_DIR}/lib/Android)
    else(ANDROID_NDK)
        if( CMAKE_CL_64)
            link_directories( ${DEPENDENCIES_DIR}/lib/Linux64)
        else(CMAKE_CL_64)
            link_directories( ${DEPENDENCIES_DIR}/lib/Linux)
        endif(CMAKE_CL_64)
    endif(ANDROID_NDK)
endif(MSVC)


FILE(GLOB _H "*.h")
FILE(GLOB _CPP "*.cpp")

if(UNIT_TEST)
    add_definitions(-DUNIT_TEST)
    add_executable(font ${_H} ${_CPP})
else(UNIT_TEST)
add_library (font STATIC ${_H} ${_CPP})
endif(UNIT_TEST)

if(MSVC)
target_link_libraries( font libfreetype )
else(MSVC)
target_link_libraries( font libfreetype.a )
endif(MSVC)

	
if(ANDROID_NDK)
link_directories( ${DEPENDENCIES_DIR}/lib/android)
endif(ANDROID_NDK)


#SET_RUNTIME_LINK(STATIC)

SET_TARGET_PROPERTIES( font PROPERTIES RELEASE_OUTPUT_NAME "font")
if (MSVC)
SET_TARGET_PROPERTIES( font PROPERTIES DEBUG_OUTPUT_NAME "font_d")
else(MSVC)
SET_TARGET_PROPERTIES( font PROPERTIES DEBUG_OUTPUT_NAME "font_d")
endif(MSVC)
